package org.stragma.symbian.apply.stratego;

import org.strategoxt.stratego_lib.*;
import org.strategoxt.stratego_lib.*;
import org.strategoxt.lang.*;
import org.spoofax.interpreter.terms.*;
import static org.strategoxt.lang.Term.*;
import org.spoofax.interpreter.library.AbstractPrimitive;
import java.util.ArrayList;
import java.lang.ref.WeakReference;

@SuppressWarnings("all") public class Beautify  
{ 
  protected static final boolean TRACES_ENABLED = true;

  protected static ITermFactory constantFactory;

  private static WeakReference<Context> initedContext;

  private static boolean isIniting;

  protected static IStrategoTerm constInt0;

  protected static IStrategoTerm const1;

  protected static IStrategoTerm const0;

  public static IStrategoConstructor _consConc_2;

  public static IStrategoConstructor _consNone_0;

  public static IStrategoConstructor _consSome_1;

  public static IStrategoConstructor _consInt_1;

  public static IStrategoConstructor _consMul_2;

  public static IStrategoConstructor _consAdd_2;

  public static IStrategoConstructor _consSub_2;

  public static IStrategoConstructor _consNeg_1;

  public static IStrategoConstructor _consLt_2;

  public static IStrategoConstructor _consGt_2;

  public static IStrategoConstructor _consLeq_2;

  public static IStrategoConstructor _consGeq_2;

  public static IStrategoConstructor _consEqu_2;

  public static IStrategoConstructor _consNeq_2;

  public static IStrategoConstructor _consAnd_2;

  public static IStrategoConstructor _consOr_2;

  public static Context init(Context context)
  { 
    synchronized(Beautify.class)
    { 
      if(isIniting)
        return null;
      try
      { 
        isIniting = true;
        ITermFactory termFactory = context.getFactory();
        if(constantFactory == null)
        { 
          initConstructors(termFactory);
          initConstants(termFactory);
        }
        if(initedContext == null || initedContext.get() != context)
        { 
          org.strategoxt.stratego_lib.Main.init(context);
          org.strategoxt.stratego_lib.Main.init(context);
          context.registerComponent("Beautify");
        }
        initedContext = new WeakReference<Context>(context);
        constantFactory = termFactory;
      }
      finally
      { 
        isIniting = false;
      }
      return context;
    }
  }

  public static Context init()
  { 
    return init(new Context());
  }

  public static void main(String args[])
  { 
    Context context = init();
    context.setStandAlone(true);
    try
    { 
      IStrategoTerm result;
      try
      { 
        result = context.invokeStrategyCLI(io_$Beautify_0_0.instance, "Beautify", args);
      }
      finally
      { 
        context.getIOAgent().closeAllFiles();
      }
      if(result == null)
      { 
        System.err.println("Beautify" + (TRACES_ENABLED ? ": rewriting failed, trace:" : ": rewriting failed"));
        context.printStackTrace();
        context.setStandAlone(false);
        System.exit(1);
      }
      else
      { 
        //System.out.println(result);
        context.setStandAlone(false);
        System.exit(0);
      }
    }
    catch(StrategoExit exit)
    { 
      context.setStandAlone(false);
      //System.exit(exit.getValue());
    }
  }

  public static IStrategoTerm mainNoExit(String ... args) throws StrategoExit
  { 
    return mainNoExit(new Context(), args);
  }

  public static IStrategoTerm mainNoExit(Context context, String ... args) throws StrategoExit
  { 
    try
    { 
      init(context);
      return context.invokeStrategyCLI(io_$Beautify_0_0.instance, "Beautify", args);
    }
    finally
    { 
      context.getIOAgent().closeAllFiles();
    }
  }

  public static Strategy getMainStrategy()
  { 
    return io_$Beautify_0_0.instance;
  }

  public static void initConstructors(ITermFactory termFactory)
  { 
    _consConc_2 = termFactory.makeConstructor("Conc", 2);
    _consNone_0 = termFactory.makeConstructor("None", 0);
    _consSome_1 = termFactory.makeConstructor("Some", 1);
    _consInt_1 = termFactory.makeConstructor("Int", 1);
    _consMul_2 = termFactory.makeConstructor("Mul", 2);
    _consAdd_2 = termFactory.makeConstructor("Add", 2);
    _consSub_2 = termFactory.makeConstructor("Sub", 2);
    _consNeg_1 = termFactory.makeConstructor("Neg", 1);
    _consLt_2 = termFactory.makeConstructor("Lt", 2);
    _consGt_2 = termFactory.makeConstructor("Gt", 2);
    _consLeq_2 = termFactory.makeConstructor("Leq", 2);
    _consGeq_2 = termFactory.makeConstructor("Geq", 2);
    _consEqu_2 = termFactory.makeConstructor("Equ", 2);
    _consNeq_2 = termFactory.makeConstructor("Neq", 2);
    _consAnd_2 = termFactory.makeConstructor("And", 2);
    _consOr_2 = termFactory.makeConstructor("Or", 2);
  }

  public static void initConstants(ITermFactory termFactory)
  { 
    const0 = termFactory.makeString("0");
    const1 = termFactory.makeString("1");
    constInt0 = termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{Beautify.const1});
  }

  @SuppressWarnings("all") public static class $Left$Group_0_0 extends Strategy 
  { 
    public static $Left$Group_0_0 instance = new $Left$Group_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      Fail0:
      { 
        IStrategoTerm term0 = term;
        IStrategoConstructor cons0 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
        Success0:
        { 
          if(cons0 == Beautify._consAdd_2)
          { 
            Fail1:
            { 
              IStrategoTerm o_12 = null;
              IStrategoTerm p_12 = null;
              IStrategoTerm q_12 = null;
              o_12 = term.getSubterm(0);
              IStrategoTerm arg0 = term.getSubterm(1);
              if(arg0.getTermType() != IStrategoTerm.APPL || Beautify._consAdd_2 != ((IStrategoAppl)arg0).getConstructor())
                break Fail1;
              p_12 = arg0.getSubterm(0);
              q_12 = arg0.getSubterm(1);
              term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{o_12, p_12}), q_12});
              if(true)
                break Success0;
            }
            term = term0;
          }
          Success1:
          { 
            if(cons0 == Beautify._consMul_2)
            { 
              Fail2:
              { 
                IStrategoTerm l_12 = null;
                IStrategoTerm m_12 = null;
                IStrategoTerm n_12 = null;
                l_12 = term.getSubterm(0);
                IStrategoTerm arg1 = term.getSubterm(1);
                if(arg1.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg1).getConstructor())
                  break Fail2;
                m_12 = arg1.getSubterm(0);
                n_12 = arg1.getSubterm(1);
                term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{l_12, m_12}), n_12});
                if(true)
                  break Success1;
              }
              term = term0;
            }
            Success2:
            { 
              if(cons0 == Beautify._consAnd_2)
              { 
                Fail3:
                { 
                  IStrategoTerm m_11 = null;
                  IStrategoTerm n_11 = null;
                  IStrategoTerm j_12 = null;
                  m_11 = term.getSubterm(0);
                  IStrategoTerm arg2 = term.getSubterm(1);
                  if(arg2.getTermType() != IStrategoTerm.APPL || Beautify._consAnd_2 != ((IStrategoAppl)arg2).getConstructor())
                    break Fail3;
                  n_11 = arg2.getSubterm(0);
                  j_12 = arg2.getSubterm(1);
                  term = termFactory.makeAppl(Beautify._consAnd_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consAnd_2, new IStrategoTerm[]{m_11, n_11}), j_12});
                  if(true)
                    break Success2;
                }
                term = term0;
              }
              if(cons0 == Beautify._consOr_2)
              { 
                IStrategoTerm h_11 = null;
                IStrategoTerm j_11 = null;
                IStrategoTerm k_11 = null;
                h_11 = term.getSubterm(0);
                IStrategoTerm arg3 = term.getSubterm(1);
                if(arg3.getTermType() != IStrategoTerm.APPL || Beautify._consOr_2 != ((IStrategoAppl)arg3).getConstructor())
                  break Fail0;
                j_11 = arg3.getSubterm(0);
                k_11 = arg3.getSubterm(1);
                term = termFactory.makeAppl(Beautify._consOr_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consOr_2, new IStrategoTerm[]{h_11, j_11}), k_11});
              }
              else
              { 
                break Fail0;
              }
            }
          }
        }
        if(true)
          return term;
      }
      context.push("LeftGroup_0_0");
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class $Eval$Neg_0_0 extends Strategy 
  { 
    public static $Eval$Neg_0_0 instance = new $Eval$Neg_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      context.push("EvalNeg_0_0");
      Fail4:
      { 
        IStrategoTerm x_32 = null;
        if(term.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)term).getConstructor())
          break Fail4;
        IStrategoTerm arg4 = term.getSubterm(0);
        if(arg4.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg4).getConstructor())
          break Fail4;
        x_32 = arg4.getSubterm(0);
        term = termFactory.makeTuple(Beautify.const0, x_32);
        term = subt$S_0_0.instance.invoke(context, term);
        if(term == null)
          break Fail4;
        term = termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term});
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class $Eval$Add0_0_0 extends Strategy 
  { 
    public static $Eval$Add0_0_0 instance = new $Eval$Add0_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      Fail5:
      { 
        IStrategoTerm term3 = term;
        IStrategoConstructor cons1 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
        Success3:
        { 
          if(cons1 == Beautify._consAdd_2)
          { 
            Fail6:
            { 
              IStrategoTerm d_33 = null;
              d_33 = term.getSubterm(0);
              IStrategoTerm arg5 = term.getSubterm(1);
              if(arg5.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg5).getConstructor())
                break Fail6;
              IStrategoTerm arg6 = arg5.getSubterm(0);
              if(arg6.getTermType() != IStrategoTerm.STRING || !"0".equals(((IStrategoString)arg6).stringValue()))
                break Fail6;
              term = d_33;
              if(true)
                break Success3;
            }
            term = term3;
          }
          if(cons1 == Beautify._consAdd_2)
          { 
            IStrategoTerm c_33 = null;
            IStrategoTerm arg7 = term.getSubterm(0);
            if(arg7.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg7).getConstructor())
              break Fail5;
            IStrategoTerm arg8 = arg7.getSubterm(0);
            if(arg8.getTermType() != IStrategoTerm.STRING || !"0".equals(((IStrategoString)arg8).stringValue()))
              break Fail5;
            c_33 = term.getSubterm(1);
            term = c_33;
          }
          else
          { 
            break Fail5;
          }
        }
        if(true)
          return term;
      }
      context.push("EvalAdd0_0_0");
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class io_$Beautify_0_0 extends Strategy 
  { 
    public static io_$Beautify_0_0 instance = new io_$Beautify_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      context.push("io_Beautify_0_0");
      Fail7:
      { 
        term = io_wrap_1_0.instance.invoke(context, term, beautify_0_0.instance);
        if(term == null)
          break Fail7;
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class beautify_0_0 extends Strategy 
  { 
    public static beautify_0_0 instance = new beautify_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      context.push("beautify_0_0");
      Fail8:
      { 
        term = t_129.instance.invoke(context, term, u_129.instance);
        if(term == null)
          break Fail8;
        term = j_132.instance.invoke(context, term, l_132.instance);
        if(term == null)
          break Fail8;
        term = u_142.instance.invoke(context, term, v_142.instance);
        if(term == null)
          break Fail8;
        term = n_143.instance.invoke(context, term, o_143.instance);
        if(term == null)
          break Fail8;
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class $Neg$Mul$Const_0_0 extends Strategy 
  { 
    public static $Neg$Mul$Const_0_0 instance = new $Neg$Mul$Const_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      context.push("NegMulConst_0_0");
      Fail9:
      { 
        IStrategoTerm term37 = term;
        IStrategoConstructor cons2 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
        Success4:
        { 
          if(cons2 == Beautify._consMul_2)
          { 
            Fail10:
            { 
              IStrategoTerm l_34 = null;
              IStrategoTerm m_34 = null;
              IStrategoTerm arg63 = term.getSubterm(0);
              if(arg63.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg63).getConstructor())
                break Fail10;
              l_34 = arg63.getSubterm(0);
              IStrategoTerm arg64 = term.getSubterm(1);
              if(arg64.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg64).getConstructor())
                break Fail10;
              m_34 = arg64.getSubterm(0);
              term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{l_34, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{m_34})})});
              if(true)
                break Success4;
            }
            term = term37;
          }
          Success5:
          { 
            if(cons2 == Beautify._consMul_2)
            { 
              Fail11:
              { 
                IStrategoTerm h_34 = null;
                IStrategoTerm i_34 = null;
                h_34 = term.getSubterm(0);
                IStrategoTerm arg65 = term.getSubterm(1);
                if(arg65.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg65).getConstructor())
                  break Fail11;
                i_34 = arg65.getSubterm(0);
                term = termFactory.makeTuple(i_34, Beautify.const0);
                term = lt$S_0_0.instance.invoke(context, term);
                if(term == null)
                  break Fail11;
                term = termFactory.makeTuple(Beautify.const0, i_34);
                term = subt$S_0_0.instance.invoke(context, term);
                if(term == null)
                  break Fail11;
                term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{h_34, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term})})});
                if(true)
                  break Success5;
              }
              term = term37;
            }
            if(cons2 == Beautify._consNeg_1)
            { 
              IStrategoTerm f_34 = null;
              f_34 = term.getSubterm(0);
              term = f_34;
              IStrategoTerm term39 = term;
              Success6:
              { 
                Fail12:
                { 
                  if(term.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)term).getConstructor())
                    break Fail12;
                  IStrategoTerm arg67 = term.getSubterm(1);
                  if(arg67.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg67).getConstructor())
                    break Fail12;
                  { 
                    if(true)
                      break Fail9;
                    if(true)
                      break Success6;
                  }
                }
                term = term39;
              }
              term = f_34;
              IStrategoTerm term40 = term;
              Success7:
              { 
                Fail13:
                { 
                  if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                    break Fail13;
                  { 
                    if(true)
                      break Fail9;
                    if(true)
                      break Success7;
                  }
                }
                term = term40;
              }
              term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{f_34, Beautify.constInt0})});
            }
            else
            { 
              break Fail9;
            }
          }
        }
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class $Sort$Neg_0_0 extends Strategy 
  { 
    public static $Sort$Neg_0_0 instance = new $Sort$Neg_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      context.push("SortNeg_0_0");
      Fail14:
      { 
        IStrategoTerm term41 = term;
        IStrategoConstructor cons5 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
        Success8:
        { 
          if(cons5 == Beautify._consAdd_2)
          { 
            Fail15:
            { 
              IStrategoTerm a_35 = null;
              IStrategoTerm b_35 = null;
              IStrategoTerm arg70 = term.getSubterm(0);
              if(arg70.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg70).getConstructor())
                break Fail15;
              a_35 = arg70.getSubterm(0);
              b_35 = term.getSubterm(1);
              term = b_35;
              IStrategoTerm term42 = term;
              Success9:
              { 
                Fail16:
                { 
                  if(term.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)term).getConstructor())
                    break Fail16;
                  { 
                    if(true)
                      break Fail15;
                    if(true)
                      break Success9;
                  }
                }
                term = term42;
              }
              term = b_35;
              IStrategoTerm term43 = term;
              Success10:
              { 
                Fail17:
                { 
                  if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                    break Fail17;
                  { 
                    if(true)
                      break Fail15;
                    if(true)
                      break Success10;
                  }
                }
                term = term43;
              }
              term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{b_35, termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{a_35})});
              if(true)
                break Success8;
            }
            term = term41;
          }
          Success11:
          { 
            if(cons5 == Beautify._consAdd_2)
            { 
              Fail18:
              { 
                IStrategoTerm w_34 = null;
                IStrategoTerm x_34 = null;
                IStrategoTerm y_34 = null;
                IStrategoTerm arg73 = term.getSubterm(0);
                if(arg73.getTermType() != IStrategoTerm.APPL || Beautify._consAdd_2 != ((IStrategoAppl)arg73).getConstructor())
                  break Fail18;
                w_34 = arg73.getSubterm(0);
                IStrategoTerm arg74 = arg73.getSubterm(1);
                if(arg74.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg74).getConstructor())
                  break Fail18;
                x_34 = arg74.getSubterm(0);
                y_34 = term.getSubterm(1);
                term = y_34;
                IStrategoTerm term45 = term;
                Success12:
                { 
                  Fail19:
                  { 
                    if(term.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)term).getConstructor())
                      break Fail19;
                    { 
                      if(true)
                        break Fail18;
                      if(true)
                        break Success12;
                    }
                  }
                  term = term45;
                }
                term = y_34;
                IStrategoTerm term46 = term;
                Success13:
                { 
                  Fail20:
                  { 
                    if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                      break Fail20;
                    { 
                      if(true)
                        break Fail18;
                      if(true)
                        break Success13;
                    }
                  }
                  term = term46;
                }
                term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{w_34, y_34}), termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{x_34})});
                if(true)
                  break Success11;
              }
              term = term41;
            }
            Success14:
            { 
              if(cons5 == Beautify._consAdd_2)
              { 
                Fail21:
                { 
                  IStrategoTerm s_34 = null;
                  IStrategoTerm t_34 = null;
                  IStrategoTerm u_34 = null;
                  IStrategoTerm arg77 = term.getSubterm(0);
                  if(arg77.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg77).getConstructor())
                    break Fail21;
                  IStrategoTerm arg78 = arg77.getSubterm(0);
                  if(arg78.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg78).getConstructor())
                    break Fail21;
                  t_34 = arg78.getSubterm(0);
                  IStrategoTerm arg79 = arg78.getSubterm(1);
                  if(arg79.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg79).getConstructor())
                    break Fail21;
                  IStrategoTerm arg80 = arg79.getSubterm(0);
                  if(arg80.getTermType() != IStrategoTerm.STRING || !"1".equals(((IStrategoString)arg80).stringValue()))
                    break Fail21;
                  IStrategoTerm arg81 = term.getSubterm(1);
                  if(arg81.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg81).getConstructor())
                    break Fail21;
                  IStrategoTerm arg82 = arg81.getSubterm(0);
                  if(arg82.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg82).getConstructor())
                    break Fail21;
                  s_34 = arg82.getSubterm(0);
                  IStrategoTerm arg83 = arg82.getSubterm(1);
                  if(arg83.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg83).getConstructor())
                    break Fail21;
                  u_34 = arg83.getSubterm(0);
                  term = termFactory.makeTuple(u_34, Beautify.const1);
                  term = gt$S_0_0.instance.invoke(context, term);
                  if(term == null)
                    break Fail21;
                  term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{s_34, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{u_34})})}), termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{t_34, Beautify.constInt0})})});
                  if(true)
                    break Success14;
                }
                term = term41;
              }
              if(cons5 == Beautify._consAdd_2)
              { 
                IStrategoTerm n_34 = null;
                IStrategoTerm o_34 = null;
                IStrategoTerm p_34 = null;
                IStrategoTerm q_34 = null;
                IStrategoTerm arg84 = term.getSubterm(0);
                if(arg84.getTermType() != IStrategoTerm.APPL || Beautify._consAdd_2 != ((IStrategoAppl)arg84).getConstructor())
                  break Fail14;
                n_34 = arg84.getSubterm(0);
                IStrategoTerm arg85 = arg84.getSubterm(1);
                if(arg85.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg85).getConstructor())
                  break Fail14;
                IStrategoTerm arg86 = arg85.getSubterm(0);
                if(arg86.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg86).getConstructor())
                  break Fail14;
                p_34 = arg86.getSubterm(0);
                IStrategoTerm arg87 = arg86.getSubterm(1);
                if(arg87.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg87).getConstructor())
                  break Fail14;
                IStrategoTerm arg88 = arg87.getSubterm(0);
                if(arg88.getTermType() != IStrategoTerm.STRING || !"1".equals(((IStrategoString)arg88).stringValue()))
                  break Fail14;
                IStrategoTerm arg89 = term.getSubterm(1);
                if(arg89.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg89).getConstructor())
                  break Fail14;
                IStrategoTerm arg90 = arg89.getSubterm(0);
                if(arg90.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg90).getConstructor())
                  break Fail14;
                o_34 = arg90.getSubterm(0);
                IStrategoTerm arg91 = arg90.getSubterm(1);
                if(arg91.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg91).getConstructor())
                  break Fail14;
                q_34 = arg91.getSubterm(0);
                term = termFactory.makeTuple(q_34, Beautify.const1);
                term = gt$S_0_0.instance.invoke(context, term);
                if(term == null)
                  break Fail14;
                term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{n_34, termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{o_34, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{q_34})})})}), termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{p_34, Beautify.constInt0})})});
              }
              else
              { 
                break Fail14;
              }
            }
          }
        }
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class $Beautify_0_0 extends Strategy 
  { 
    public static $Beautify_0_0 instance = new $Beautify_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      context.push("Beautify_0_0");
      Fail22:
      { 
        IStrategoTerm term48 = term;
        IStrategoConstructor cons10 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
        Success15:
        { 
          if(cons10 == Beautify._consAdd_2)
          { 
            Fail23:
            { 
              IStrategoTerm c_36 = null;
              IStrategoTerm d_36 = null;
              c_36 = term.getSubterm(0);
              IStrategoTerm arg92 = term.getSubterm(1);
              if(arg92.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg92).getConstructor())
                break Fail23;
              d_36 = arg92.getSubterm(0);
              term = termFactory.makeAppl(Beautify._consSub_2, new IStrategoTerm[]{c_36, d_36});
              if(true)
                break Success15;
            }
            term = term48;
          }
          Success16:
          { 
            if(cons10 == Beautify._consMul_2)
            { 
              Fail24:
              { 
                IStrategoTerm z_35 = null;
                IStrategoTerm a_36 = null;
                a_36 = term.getSubterm(0);
                IStrategoTerm arg93 = term.getSubterm(1);
                if(arg93.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg93).getConstructor())
                  break Fail24;
                z_35 = arg93.getSubterm(0);
                term = a_36;
                IStrategoTerm term50 = term;
                Success17:
                { 
                  Fail25:
                  { 
                    if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                      break Fail25;
                    { 
                      if(true)
                        break Fail24;
                      if(true)
                        break Success17;
                    }
                  }
                  term = term50;
                }
                term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{z_35}), a_36});
                if(true)
                  break Success16;
              }
              term = term48;
            }
            Success18:
            { 
              if(cons10 == Beautify._consAdd_2)
              { 
                Fail26:
                { 
                  IStrategoTerm v_35 = null;
                  IStrategoTerm w_35 = null;
                  v_35 = term.getSubterm(0);
                  IStrategoTerm arg95 = term.getSubterm(1);
                  if(arg95.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg95).getConstructor())
                    break Fail26;
                  w_35 = arg95.getSubterm(0);
                  term = termFactory.makeTuple(w_35, Beautify.const0);
                  term = lt$S_0_0.instance.invoke(context, term);
                  if(term == null)
                    break Fail26;
                  term = termFactory.makeTuple(Beautify.const0, w_35);
                  term = subt$S_0_0.instance.invoke(context, term);
                  if(term == null)
                    break Fail26;
                  term = termFactory.makeAppl(Beautify._consSub_2, new IStrategoTerm[]{v_35, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term})});
                  if(true)
                    break Success18;
                }
                term = term48;
              }
              Success19:
              { 
                if(cons10 == Beautify._consGt_2)
                { 
                  Fail27:
                  { 
                    IStrategoTerm s_35 = null;
                    IStrategoTerm t_35 = null;
                    IStrategoTerm u_35 = null;
                    IStrategoTerm arg96 = term.getSubterm(0);
                    if(arg96.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg96).getConstructor())
                      break Fail27;
                    s_35 = arg96.getSubterm(0);
                    t_35 = arg96.getSubterm(1);
                    u_35 = term.getSubterm(1);
                    term = termFactory.makeAppl(Beautify._consGt_2, new IStrategoTerm[]{s_35, termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{t_35, u_35})});
                    if(true)
                      break Success19;
                  }
                  term = term48;
                }
                Success20:
                { 
                  if(cons10 == Beautify._consGeq_2)
                  { 
                    Fail28:
                    { 
                      IStrategoTerm p_35 = null;
                      IStrategoTerm q_35 = null;
                      IStrategoTerm r_35 = null;
                      IStrategoTerm arg97 = term.getSubterm(0);
                      if(arg97.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg97).getConstructor())
                        break Fail28;
                      p_35 = arg97.getSubterm(0);
                      q_35 = arg97.getSubterm(1);
                      r_35 = term.getSubterm(1);
                      term = termFactory.makeAppl(Beautify._consGeq_2, new IStrategoTerm[]{p_35, termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{q_35, r_35})});
                      if(true)
                        break Success20;
                    }
                    term = term48;
                  }
                  Success21:
                  { 
                    if(cons10 == Beautify._consEqu_2)
                    { 
                      Fail29:
                      { 
                        IStrategoTerm m_35 = null;
                        IStrategoTerm n_35 = null;
                        IStrategoTerm o_35 = null;
                        IStrategoTerm arg98 = term.getSubterm(0);
                        if(arg98.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg98).getConstructor())
                          break Fail29;
                        m_35 = arg98.getSubterm(0);
                        n_35 = arg98.getSubterm(1);
                        o_35 = term.getSubterm(1);
                        term = termFactory.makeAppl(Beautify._consEqu_2, new IStrategoTerm[]{m_35, termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{n_35, o_35})});
                        if(true)
                          break Success21;
                      }
                      term = term48;
                    }
                    Success22:
                    { 
                      if(cons10 == Beautify._consLt_2)
                      { 
                        Fail30:
                        { 
                          IStrategoTerm j_35 = null;
                          IStrategoTerm k_35 = null;
                          IStrategoTerm l_35 = null;
                          IStrategoTerm arg99 = term.getSubterm(0);
                          if(arg99.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg99).getConstructor())
                            break Fail30;
                          j_35 = arg99.getSubterm(0);
                          k_35 = arg99.getSubterm(1);
                          l_35 = term.getSubterm(1);
                          term = termFactory.makeAppl(Beautify._consLt_2, new IStrategoTerm[]{j_35, termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{k_35, l_35})});
                          if(true)
                            break Success22;
                        }
                        term = term48;
                      }
                      Success23:
                      { 
                        if(cons10 == Beautify._consLeq_2)
                        { 
                          Fail31:
                          { 
                            IStrategoTerm g_35 = null;
                            IStrategoTerm h_35 = null;
                            IStrategoTerm i_35 = null;
                            IStrategoTerm arg100 = term.getSubterm(0);
                            if(arg100.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg100).getConstructor())
                              break Fail31;
                            g_35 = arg100.getSubterm(0);
                            h_35 = arg100.getSubterm(1);
                            i_35 = term.getSubterm(1);
                            term = termFactory.makeAppl(Beautify._consLeq_2, new IStrategoTerm[]{g_35, termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{h_35, i_35})});
                            if(true)
                              break Success23;
                          }
                          term = term48;
                        }
                        if(cons10 == Beautify._consNeq_2)
                        { 
                          IStrategoTerm d_35 = null;
                          IStrategoTerm e_35 = null;
                          IStrategoTerm f_35 = null;
                          IStrategoTerm arg101 = term.getSubterm(0);
                          if(arg101.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg101).getConstructor())
                            break Fail22;
                          d_35 = arg101.getSubterm(0);
                          e_35 = arg101.getSubterm(1);
                          f_35 = term.getSubterm(1);
                          term = termFactory.makeAppl(Beautify._consNeq_2, new IStrategoTerm[]{d_35, termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{e_35, f_35})});
                        }
                        else
                        { 
                          break Fail22;
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class $Neg$Mul_0_0 extends Strategy 
  { 
    public static $Neg$Mul_0_0 instance = new $Neg$Mul_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      context.push("NegMul_0_0");
      Fail32:
      { 
        IStrategoTerm e_36 = null;
        IStrategoTerm f_36 = null;
        if(term.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)term).getConstructor())
          break Fail32;
        IStrategoTerm arg102 = term.getSubterm(0);
        if(arg102.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg102).getConstructor())
          break Fail32;
        IStrategoTerm arg103 = arg102.getSubterm(0);
        if(arg103.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg103).getConstructor())
          break Fail32;
        f_36 = arg103.getSubterm(0);
        e_36 = arg102.getSubterm(1);
        term = termFactory.makeTuple(Beautify.const0, f_36);
        term = subt$S_0_0.instance.invoke(context, term);
        if(term == null)
          break Fail32;
        term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term}), e_36});
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class $Remove$Mul1_0_0 extends Strategy 
  { 
    public static $Remove$Mul1_0_0 instance = new $Remove$Mul1_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      Fail33:
      { 
        IStrategoTerm term57 = term;
        IStrategoConstructor cons12 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
        Success24:
        { 
          if(cons12 == Beautify._consMul_2)
          { 
            Fail34:
            { 
              IStrategoTerm j_36 = null;
              IStrategoTerm arg104 = term.getSubterm(0);
              if(arg104.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg104).getConstructor())
                break Fail34;
              IStrategoTerm arg105 = arg104.getSubterm(0);
              if(arg105.getTermType() != IStrategoTerm.STRING || !"1".equals(((IStrategoString)arg105).stringValue()))
                break Fail34;
              j_36 = term.getSubterm(1);
              term = j_36;
              if(true)
                break Success24;
            }
            term = term57;
          }
          if(cons12 == Beautify._consMul_2)
          { 
            IStrategoTerm i_36 = null;
            IStrategoTerm arg106 = term.getSubterm(0);
            if(arg106.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg106).getConstructor())
              break Fail33;
            IStrategoTerm arg107 = arg106.getSubterm(0);
            if(arg107.getTermType() != IStrategoTerm.STRING || !"-1".equals(((IStrategoString)arg107).stringValue()))
              break Fail33;
            i_36 = term.getSubterm(1);
            term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{i_36});
          }
          else
          { 
            break Fail33;
          }
        }
        if(true)
          return term;
      }
      context.push("RemoveMul1_0_0");
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") public static class main_0_0 extends Strategy 
  { 
    public static main_0_0 instance = new main_0_0();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      context.push("main_0_0");
      Fail35:
      { 
        term = io_$Beautify_0_0.instance.invoke(context, term);
        if(term == null)
          break Fail35;
        context.popOnSuccess();
        if(true)
          return term;
      }
      context.popOnFailure();
      return null;
    }
  }

  @SuppressWarnings("all") private static final class v_142 extends Strategy 
  { 
    public static final v_142 instance = new v_142();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      Fail36:
      { 
        IStrategoTerm term18 = term;
        Success25:
        { 
          Fail37:
          { 
            IStrategoTerm term19 = term;
            Success26:
            { 
              Fail38:
              { 
                IStrategoTerm term20 = term;
                IStrategoConstructor cons13 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
                Success27:
                { 
                  if(cons13 == Beautify._consAdd_2)
                  { 
                    Fail39:
                    { 
                      IStrategoTerm z_137 = null;
                      IStrategoTerm a_138 = null;
                      z_137 = term.getSubterm(0);
                      IStrategoTerm arg40 = term.getSubterm(1);
                      if(arg40.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg40).getConstructor())
                        break Fail39;
                      a_138 = arg40.getSubterm(0);
                      term = termFactory.makeAppl(Beautify._consSub_2, new IStrategoTerm[]{z_137, a_138});
                      if(true)
                        break Success27;
                    }
                    term = term20;
                  }
                  Success28:
                  { 
                    if(cons13 == Beautify._consMul_2)
                    { 
                      Fail40:
                      { 
                        IStrategoTerm b_138 = null;
                        IStrategoTerm c_138 = null;
                        c_138 = term.getSubterm(0);
                        IStrategoTerm arg41 = term.getSubterm(1);
                        if(arg41.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg41).getConstructor())
                          break Fail40;
                        b_138 = arg41.getSubterm(0);
                        term = c_138;
                        IStrategoTerm term22 = term;
                        Success29:
                        { 
                          Fail41:
                          { 
                            if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                              break Fail41;
                            { 
                              if(true)
                                break Fail40;
                              if(true)
                                break Success29;
                            }
                          }
                          term = term22;
                        }
                        term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{b_138}), c_138});
                        term = this.invoke(context, term);
                        if(term == null)
                          break Fail40;
                        if(true)
                          break Success28;
                      }
                      term = term20;
                    }
                    Success30:
                    { 
                      if(cons13 == Beautify._consAdd_2)
                      { 
                        Fail42:
                        { 
                          IStrategoTerm e_138 = null;
                          IStrategoTerm f_138 = null;
                          IStrategoTerm g_138 = null;
                          e_138 = term.getSubterm(0);
                          IStrategoTerm arg43 = term.getSubterm(1);
                          if(arg43.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg43).getConstructor())
                            break Fail42;
                          f_138 = arg43.getSubterm(0);
                          term = termFactory.makeTuple(f_138, Beautify.const0);
                          term = lt$S_0_0.instance.invoke(context, term);
                          if(term == null)
                            break Fail42;
                          term = termFactory.makeTuple(Beautify.const0, f_138);
                          term = subt$S_0_0.instance.invoke(context, term);
                          if(term == null)
                            break Fail42;
                          g_138 = term;
                          term = u_142.instance.invoke(context, g_138, this);
                          if(term == null)
                            break Fail42;
                          term = termFactory.makeAppl(Beautify._consSub_2, new IStrategoTerm[]{e_138, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term})});
                          if(true)
                            break Success30;
                        }
                        term = term20;
                      }
                      Success31:
                      { 
                        if(cons13 == Beautify._consGt_2)
                        { 
                          Fail43:
                          { 
                            IStrategoTerm k_138 = null;
                            IStrategoTerm l_138 = null;
                            IStrategoTerm m_138 = null;
                            IStrategoTerm arg44 = term.getSubterm(0);
                            if(arg44.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg44).getConstructor())
                              break Fail43;
                            k_138 = arg44.getSubterm(0);
                            l_138 = arg44.getSubterm(1);
                            m_138 = term.getSubterm(1);
                            term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{l_138, m_138});
                            term = this.invoke(context, term);
                            if(term == null)
                              break Fail43;
                            term = termFactory.makeAppl(Beautify._consGt_2, new IStrategoTerm[]{k_138, term});
                            term = this.invoke(context, term);
                            if(term == null)
                              break Fail43;
                            if(true)
                              break Success31;
                          }
                          term = term20;
                        }
                        Success32:
                        { 
                          if(cons13 == Beautify._consGeq_2)
                          { 
                            Fail44:
                            { 
                              IStrategoTerm p_138 = null;
                              IStrategoTerm t_138 = null;
                              IStrategoTerm u_138 = null;
                              IStrategoTerm arg45 = term.getSubterm(0);
                              if(arg45.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg45).getConstructor())
                                break Fail44;
                              p_138 = arg45.getSubterm(0);
                              t_138 = arg45.getSubterm(1);
                              u_138 = term.getSubterm(1);
                              term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{t_138, u_138});
                              term = this.invoke(context, term);
                              if(term == null)
                                break Fail44;
                              term = termFactory.makeAppl(Beautify._consGeq_2, new IStrategoTerm[]{p_138, term});
                              term = this.invoke(context, term);
                              if(term == null)
                                break Fail44;
                              if(true)
                                break Success32;
                            }
                            term = term20;
                          }
                          Success33:
                          { 
                            if(cons13 == Beautify._consEqu_2)
                            { 
                              Fail45:
                              { 
                                IStrategoTerm x_138 = null;
                                IStrategoTerm y_138 = null;
                                IStrategoTerm z_138 = null;
                                IStrategoTerm arg46 = term.getSubterm(0);
                                if(arg46.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg46).getConstructor())
                                  break Fail45;
                                x_138 = arg46.getSubterm(0);
                                y_138 = arg46.getSubterm(1);
                                z_138 = term.getSubterm(1);
                                term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{y_138, z_138});
                                term = this.invoke(context, term);
                                if(term == null)
                                  break Fail45;
                                term = termFactory.makeAppl(Beautify._consEqu_2, new IStrategoTerm[]{x_138, term});
                                term = this.invoke(context, term);
                                if(term == null)
                                  break Fail45;
                                if(true)
                                  break Success33;
                              }
                              term = term20;
                            }
                            Success34:
                            { 
                              if(cons13 == Beautify._consLt_2)
                              { 
                                Fail46:
                                { 
                                  IStrategoTerm c_139 = null;
                                  IStrategoTerm d_139 = null;
                                  IStrategoTerm e_139 = null;
                                  IStrategoTerm arg47 = term.getSubterm(0);
                                  if(arg47.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg47).getConstructor())
                                    break Fail46;
                                  c_139 = arg47.getSubterm(0);
                                  d_139 = arg47.getSubterm(1);
                                  e_139 = term.getSubterm(1);
                                  term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{d_139, e_139});
                                  term = this.invoke(context, term);
                                  if(term == null)
                                    break Fail46;
                                  term = termFactory.makeAppl(Beautify._consLt_2, new IStrategoTerm[]{c_139, term});
                                  term = this.invoke(context, term);
                                  if(term == null)
                                    break Fail46;
                                  if(true)
                                    break Success34;
                                }
                                term = term20;
                              }
                              Success35:
                              { 
                                if(cons13 == Beautify._consLeq_2)
                                { 
                                  Fail47:
                                  { 
                                    IStrategoTerm h_139 = null;
                                    IStrategoTerm i_139 = null;
                                    IStrategoTerm j_139 = null;
                                    IStrategoTerm arg48 = term.getSubterm(0);
                                    if(arg48.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg48).getConstructor())
                                      break Fail47;
                                    h_139 = arg48.getSubterm(0);
                                    i_139 = arg48.getSubterm(1);
                                    j_139 = term.getSubterm(1);
                                    term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{i_139, j_139});
                                    term = this.invoke(context, term);
                                    if(term == null)
                                      break Fail47;
                                    term = termFactory.makeAppl(Beautify._consLeq_2, new IStrategoTerm[]{h_139, term});
                                    term = this.invoke(context, term);
                                    if(term == null)
                                      break Fail47;
                                    if(true)
                                      break Success35;
                                  }
                                  term = term20;
                                }
                                if(cons13 == Beautify._consNeq_2)
                                { 
                                  IStrategoTerm b_140 = null;
                                  IStrategoTerm c_140 = null;
                                  IStrategoTerm g_140 = null;
                                  IStrategoTerm arg49 = term.getSubterm(0);
                                  if(arg49.getTermType() != IStrategoTerm.APPL || Beautify._consSub_2 != ((IStrategoAppl)arg49).getConstructor())
                                    break Fail38;
                                  b_140 = arg49.getSubterm(0);
                                  c_140 = arg49.getSubterm(1);
                                  g_140 = term.getSubterm(1);
                                  term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{c_140, g_140});
                                  term = this.invoke(context, term);
                                  if(term == null)
                                    break Fail38;
                                  term = termFactory.makeAppl(Beautify._consNeq_2, new IStrategoTerm[]{b_140, term});
                                  term = this.invoke(context, term);
                                  if(term == null)
                                    break Fail38;
                                }
                                else
                                { 
                                  break Fail38;
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
                if(true)
                  break Success26;
              }
              term = term19;
              IStrategoTerm term29 = term;
              Success36:
              { 
                Fail48:
                { 
                  IStrategoTerm term30 = term;
                  IStrategoConstructor cons15 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
                  Success37:
                  { 
                    if(cons15 == Beautify._consAdd_2)
                    { 
                      Fail49:
                      { 
                        IStrategoTerm j_140 = null;
                        IStrategoTerm n_140 = null;
                        IStrategoTerm r_140 = null;
                        j_140 = term.getSubterm(0);
                        IStrategoTerm arg50 = term.getSubterm(1);
                        if(arg50.getTermType() != IStrategoTerm.APPL || Beautify._consAdd_2 != ((IStrategoAppl)arg50).getConstructor())
                          break Fail49;
                        n_140 = arg50.getSubterm(0);
                        r_140 = arg50.getSubterm(1);
                        term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{j_140, n_140});
                        term = this.invoke(context, term);
                        if(term == null)
                          break Fail49;
                        term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{term, r_140});
                        term = this.invoke(context, term);
                        if(term == null)
                          break Fail49;
                        if(true)
                          break Success37;
                      }
                      term = term30;
                    }
                    Success38:
                    { 
                      if(cons15 == Beautify._consMul_2)
                      { 
                        Fail50:
                        { 
                          IStrategoTerm u_140 = null;
                          IStrategoTerm v_140 = null;
                          IStrategoTerm w_140 = null;
                          u_140 = term.getSubterm(0);
                          IStrategoTerm arg51 = term.getSubterm(1);
                          if(arg51.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg51).getConstructor())
                            break Fail50;
                          v_140 = arg51.getSubterm(0);
                          w_140 = arg51.getSubterm(1);
                          term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{u_140, v_140});
                          term = this.invoke(context, term);
                          if(term == null)
                            break Fail50;
                          term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{term, w_140});
                          term = this.invoke(context, term);
                          if(term == null)
                            break Fail50;
                          if(true)
                            break Success38;
                        }
                        term = term30;
                      }
                      Success39:
                      { 
                        if(cons15 == Beautify._consAnd_2)
                        { 
                          Fail51:
                          { 
                            IStrategoTerm c_141 = null;
                            IStrategoTerm d_141 = null;
                            IStrategoTerm h_141 = null;
                            c_141 = term.getSubterm(0);
                            IStrategoTerm arg52 = term.getSubterm(1);
                            if(arg52.getTermType() != IStrategoTerm.APPL || Beautify._consAnd_2 != ((IStrategoAppl)arg52).getConstructor())
                              break Fail51;
                            d_141 = arg52.getSubterm(0);
                            h_141 = arg52.getSubterm(1);
                            term = termFactory.makeAppl(Beautify._consAnd_2, new IStrategoTerm[]{c_141, d_141});
                            term = this.invoke(context, term);
                            if(term == null)
                              break Fail51;
                            term = termFactory.makeAppl(Beautify._consAnd_2, new IStrategoTerm[]{term, h_141});
                            term = this.invoke(context, term);
                            if(term == null)
                              break Fail51;
                            if(true)
                              break Success39;
                          }
                          term = term30;
                        }
                        if(cons15 == Beautify._consOr_2)
                        { 
                          IStrategoTerm u_141 = null;
                          IStrategoTerm v_141 = null;
                          IStrategoTerm h_142 = null;
                          u_141 = term.getSubterm(0);
                          IStrategoTerm arg53 = term.getSubterm(1);
                          if(arg53.getTermType() != IStrategoTerm.APPL || Beautify._consOr_2 != ((IStrategoAppl)arg53).getConstructor())
                            break Fail48;
                          v_141 = arg53.getSubterm(0);
                          h_142 = arg53.getSubterm(1);
                          term = termFactory.makeAppl(Beautify._consOr_2, new IStrategoTerm[]{u_141, v_141});
                          term = this.invoke(context, term);
                          if(term == null)
                            break Fail48;
                          term = termFactory.makeAppl(Beautify._consOr_2, new IStrategoTerm[]{term, h_142});
                          term = this.invoke(context, term);
                          if(term == null)
                            break Fail48;
                        }
                        else
                        { 
                          break Fail48;
                        }
                      }
                    }
                  }
                  if(true)
                    break Success36;
                }
                term = term29;
                IStrategoTerm term33 = term;
                Success40:
                { 
                  Fail52:
                  { 
                    IStrategoTerm term34 = term;
                    IStrategoConstructor cons16 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
                    Success41:
                    { 
                      if(cons16 == Beautify._consAdd_2)
                      { 
                        Fail53:
                        { 
                          IStrategoTerm l_142 = null;
                          l_142 = term.getSubterm(0);
                          IStrategoTerm arg54 = term.getSubterm(1);
                          if(arg54.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg54).getConstructor())
                            break Fail53;
                          IStrategoTerm arg55 = arg54.getSubterm(0);
                          if(arg55.getTermType() != IStrategoTerm.STRING || !"0".equals(((IStrategoString)arg55).stringValue()))
                            break Fail53;
                          term = l_142;
                          if(true)
                            break Success41;
                        }
                        term = term34;
                      }
                      if(cons16 == Beautify._consAdd_2)
                      { 
                        IStrategoTerm m_142 = null;
                        IStrategoTerm arg56 = term.getSubterm(0);
                        if(arg56.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg56).getConstructor())
                          break Fail52;
                        IStrategoTerm arg57 = arg56.getSubterm(0);
                        if(arg57.getTermType() != IStrategoTerm.STRING || !"0".equals(((IStrategoString)arg57).stringValue()))
                          break Fail52;
                        m_142 = term.getSubterm(1);
                        term = m_142;
                      }
                      else
                      { 
                        break Fail52;
                      }
                    }
                    if(true)
                      break Success40;
                  }
                  term = term33;
                  IStrategoTerm term35 = term;
                  IStrategoConstructor cons17 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
                  Success42:
                  { 
                    if(cons17 == Beautify._consNeg_1)
                    { 
                      Fail54:
                      { 
                        IStrategoTerm n_142 = null;
                        IStrategoTerm o_142 = null;
                        IStrategoTerm arg58 = term.getSubterm(0);
                        if(arg58.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg58).getConstructor())
                          break Fail54;
                        n_142 = arg58.getSubterm(0);
                        term = termFactory.makeTuple(Beautify.const0, n_142);
                        term = subt$S_0_0.instance.invoke(context, term);
                        if(term == null)
                          break Fail54;
                        o_142 = term;
                        term = u_142.instance.invoke(context, o_142, this);
                        if(term == null)
                          break Fail54;
                        term = termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term});
                        if(true)
                          break Success42;
                      }
                      term = term35;
                    }
                    Success43:
                    { 
                      if(cons17 == Beautify._consMul_2)
                      { 
                        Fail55:
                        { 
                          IStrategoTerm s_142 = null;
                          IStrategoTerm arg59 = term.getSubterm(0);
                          if(arg59.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg59).getConstructor())
                            break Fail55;
                          IStrategoTerm arg60 = arg59.getSubterm(0);
                          if(arg60.getTermType() != IStrategoTerm.STRING || !"1".equals(((IStrategoString)arg60).stringValue()))
                            break Fail55;
                          s_142 = term.getSubterm(1);
                          term = s_142;
                          if(true)
                            break Success43;
                        }
                        term = term35;
                      }
                      if(cons17 == Beautify._consMul_2)
                      { 
                        IStrategoTerm t_142 = null;
                        IStrategoTerm arg61 = term.getSubterm(0);
                        if(arg61.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg61).getConstructor())
                          break Fail37;
                        IStrategoTerm arg62 = arg61.getSubterm(0);
                        if(arg62.getTermType() != IStrategoTerm.STRING || !"-1".equals(((IStrategoString)arg62).stringValue()))
                          break Fail37;
                        t_142 = term.getSubterm(1);
                        term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{t_142});
                        term = this.invoke(context, term);
                        if(term == null)
                          break Fail37;
                      }
                      else
                      { 
                        break Fail37;
                      }
                    }
                  }
                }
              }
            }
            if(true)
              break Success25;
          }
          term = term18;
        }
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class u_142 extends Strategy 
  { 
    public static final u_142 instance = new u_142();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term, Strategy w_142)
    { 
      Fail56:
      { 
        lifted3 lifted30 = new lifted3();
        lifted30.w_142 = w_142;
        term = SRTS_all.instance.invoke(context, term, lifted30);
        if(term == null)
          break Fail56;
        term = w_142.invoke(context, term);
        if(term == null)
          break Fail56;
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class lifted3 extends Strategy 
  { 
    Strategy w_142;

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      Fail57:
      { 
        term = u_142.instance.invoke(context, term, w_142);
        if(term == null)
          break Fail57;
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class l_132 extends Strategy 
  { 
    public static final l_132 instance = new l_132();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      Fail58:
      { 
        IStrategoTerm term10 = term;
        Success44:
        { 
          Fail59:
          { 
            IStrategoTerm term11 = term;
            IStrategoConstructor cons18 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
            Success45:
            { 
              if(cons18 == Beautify._consAdd_2)
              { 
                Fail60:
                { 
                  IStrategoTerm d_131 = null;
                  IStrategoTerm f_131 = null;
                  IStrategoTerm arg18 = term.getSubterm(0);
                  if(arg18.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg18).getConstructor())
                    break Fail60;
                  d_131 = arg18.getSubterm(0);
                  f_131 = term.getSubterm(1);
                  term = f_131;
                  IStrategoTerm term12 = term;
                  Success46:
                  { 
                    Fail61:
                    { 
                      if(term.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)term).getConstructor())
                        break Fail61;
                      { 
                        if(true)
                          break Fail60;
                        if(true)
                          break Success46;
                      }
                    }
                    term = term12;
                  }
                  term = f_131;
                  IStrategoTerm term13 = term;
                  Success47:
                  { 
                    Fail62:
                    { 
                      if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                        break Fail62;
                      { 
                        if(true)
                          break Fail60;
                        if(true)
                          break Success47;
                      }
                    }
                    term = term13;
                  }
                  term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{f_131, termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{d_131})});
                  term = this.invoke(context, term);
                  if(term == null)
                    break Fail60;
                  if(true)
                    break Success45;
                }
                term = term11;
              }
              Success48:
              { 
                if(cons18 == Beautify._consAdd_2)
                { 
                  Fail63:
                  { 
                    IStrategoTerm i_131 = null;
                    IStrategoTerm k_131 = null;
                    IStrategoTerm p_131 = null;
                    IStrategoTerm arg21 = term.getSubterm(0);
                    if(arg21.getTermType() != IStrategoTerm.APPL || Beautify._consAdd_2 != ((IStrategoAppl)arg21).getConstructor())
                      break Fail63;
                    i_131 = arg21.getSubterm(0);
                    IStrategoTerm arg22 = arg21.getSubterm(1);
                    if(arg22.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg22).getConstructor())
                      break Fail63;
                    k_131 = arg22.getSubterm(0);
                    p_131 = term.getSubterm(1);
                    term = p_131;
                    IStrategoTerm term15 = term;
                    Success49:
                    { 
                      Fail64:
                      { 
                        if(term.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)term).getConstructor())
                          break Fail64;
                        { 
                          if(true)
                            break Fail63;
                          if(true)
                            break Success49;
                        }
                      }
                      term = term15;
                    }
                    term = p_131;
                    IStrategoTerm term16 = term;
                    Success50:
                    { 
                      Fail65:
                      { 
                        if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                          break Fail65;
                        { 
                          if(true)
                            break Fail63;
                          if(true)
                            break Success50;
                        }
                      }
                      term = term16;
                    }
                    term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{i_131, p_131});
                    term = this.invoke(context, term);
                    if(term == null)
                      break Fail63;
                    term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{term, termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{k_131})});
                    term = this.invoke(context, term);
                    if(term == null)
                      break Fail63;
                    if(true)
                      break Success48;
                  }
                  term = term11;
                }
                Success51:
                { 
                  if(cons18 == Beautify._consAdd_2)
                  { 
                    Fail66:
                    { 
                      IStrategoTerm v_131 = null;
                      IStrategoTerm w_131 = null;
                      IStrategoTerm y_131 = null;
                      IStrategoTerm arg25 = term.getSubterm(0);
                      if(arg25.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg25).getConstructor())
                        break Fail66;
                      IStrategoTerm arg26 = arg25.getSubterm(0);
                      if(arg26.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg26).getConstructor())
                        break Fail66;
                      w_131 = arg26.getSubterm(0);
                      IStrategoTerm arg27 = arg26.getSubterm(1);
                      if(arg27.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg27).getConstructor())
                        break Fail66;
                      IStrategoTerm arg28 = arg27.getSubterm(0);
                      if(arg28.getTermType() != IStrategoTerm.STRING || !"1".equals(((IStrategoString)arg28).stringValue()))
                        break Fail66;
                      IStrategoTerm arg29 = term.getSubterm(1);
                      if(arg29.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg29).getConstructor())
                        break Fail66;
                      IStrategoTerm arg30 = arg29.getSubterm(0);
                      if(arg30.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg30).getConstructor())
                        break Fail66;
                      v_131 = arg30.getSubterm(0);
                      IStrategoTerm arg31 = arg30.getSubterm(1);
                      if(arg31.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg31).getConstructor())
                        break Fail66;
                      y_131 = arg31.getSubterm(0);
                      term = termFactory.makeTuple(y_131, Beautify.const1);
                      term = gt$S_0_0.instance.invoke(context, term);
                      if(term == null)
                        break Fail66;
                      term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{v_131, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{y_131})})}), termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{w_131, Beautify.constInt0})})});
                      term = this.invoke(context, term);
                      if(term == null)
                        break Fail66;
                      if(true)
                        break Success51;
                    }
                    term = term11;
                  }
                  if(cons18 == Beautify._consAdd_2)
                  { 
                    IStrategoTerm a_132 = null;
                    IStrategoTerm b_132 = null;
                    IStrategoTerm c_132 = null;
                    IStrategoTerm d_132 = null;
                    IStrategoTerm arg32 = term.getSubterm(0);
                    if(arg32.getTermType() != IStrategoTerm.APPL || Beautify._consAdd_2 != ((IStrategoAppl)arg32).getConstructor())
                      break Fail59;
                    a_132 = arg32.getSubterm(0);
                    IStrategoTerm arg33 = arg32.getSubterm(1);
                    if(arg33.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg33).getConstructor())
                      break Fail59;
                    IStrategoTerm arg34 = arg33.getSubterm(0);
                    if(arg34.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg34).getConstructor())
                      break Fail59;
                    c_132 = arg34.getSubterm(0);
                    IStrategoTerm arg35 = arg34.getSubterm(1);
                    if(arg35.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg35).getConstructor())
                      break Fail59;
                    IStrategoTerm arg36 = arg35.getSubterm(0);
                    if(arg36.getTermType() != IStrategoTerm.STRING || !"1".equals(((IStrategoString)arg36).stringValue()))
                      break Fail59;
                    IStrategoTerm arg37 = term.getSubterm(1);
                    if(arg37.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg37).getConstructor())
                      break Fail59;
                    IStrategoTerm arg38 = arg37.getSubterm(0);
                    if(arg38.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg38).getConstructor())
                      break Fail59;
                    b_132 = arg38.getSubterm(0);
                    IStrategoTerm arg39 = arg38.getSubterm(1);
                    if(arg39.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg39).getConstructor())
                      break Fail59;
                    d_132 = arg39.getSubterm(0);
                    term = termFactory.makeTuple(d_132, Beautify.const1);
                    term = gt$S_0_0.instance.invoke(context, term);
                    if(term == null)
                      break Fail59;
                    term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{a_132, termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{b_132, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{d_132})})})});
                    term = this.invoke(context, term);
                    if(term == null)
                      break Fail59;
                    term = termFactory.makeAppl(Beautify._consAdd_2, new IStrategoTerm[]{term, termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{c_132, Beautify.constInt0})})});
                    term = this.invoke(context, term);
                    if(term == null)
                      break Fail59;
                  }
                  else
                  { 
                    break Fail59;
                  }
                }
              }
            }
            if(true)
              break Success44;
          }
          term = term10;
        }
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class j_132 extends Strategy 
  { 
    public static final j_132 instance = new j_132();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term, Strategy n_132)
    { 
      Fail67:
      { 
        lifted2 lifted20 = new lifted2();
        lifted20.n_132 = n_132;
        term = SRTS_all.instance.invoke(context, term, lifted20);
        if(term == null)
          break Fail67;
        term = n_132.invoke(context, term);
        if(term == null)
          break Fail67;
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class lifted2 extends Strategy 
  { 
    Strategy n_132;

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      Fail68:
      { 
        term = j_132.instance.invoke(context, term, n_132);
        if(term == null)
          break Fail68;
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class u_129 extends Strategy 
  { 
    public static final u_129 instance = new u_129();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      Fail69:
      { 
        IStrategoTerm term5 = term;
        Success52:
        { 
          Fail70:
          { 
            IStrategoTerm term6 = term;
            IStrategoConstructor cons23 = term.getTermType() == IStrategoTerm.APPL ? ((IStrategoAppl)term).getConstructor() : null;
            Success53:
            { 
              if(cons23 == Beautify._consMul_2)
              { 
                Fail71:
                { 
                  IStrategoTerm w_128 = null;
                  IStrategoTerm x_128 = null;
                  IStrategoTerm arg11 = term.getSubterm(0);
                  if(arg11.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)arg11).getConstructor())
                    break Fail71;
                  w_128 = arg11.getSubterm(0);
                  IStrategoTerm arg12 = term.getSubterm(1);
                  if(arg12.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg12).getConstructor())
                    break Fail71;
                  x_128 = arg12.getSubterm(0);
                  term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{w_128, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{x_128})});
                  term = this.invoke(context, term);
                  if(term == null)
                    break Fail71;
                  term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{term});
                  term = this.invoke(context, term);
                  if(term == null)
                    break Fail71;
                  if(true)
                    break Success53;
                }
                term = term6;
              }
              Success54:
              { 
                if(cons23 == Beautify._consMul_2)
                { 
                  Fail72:
                  { 
                    IStrategoTerm a_129 = null;
                    IStrategoTerm b_129 = null;
                    IStrategoTerm c_129 = null;
                    a_129 = term.getSubterm(0);
                    IStrategoTerm arg13 = term.getSubterm(1);
                    if(arg13.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg13).getConstructor())
                      break Fail72;
                    b_129 = arg13.getSubterm(0);
                    term = termFactory.makeTuple(b_129, Beautify.const0);
                    term = lt$S_0_0.instance.invoke(context, term);
                    if(term == null)
                      break Fail72;
                    term = termFactory.makeTuple(Beautify.const0, b_129);
                    term = subt$S_0_0.instance.invoke(context, term);
                    if(term == null)
                      break Fail72;
                    c_129 = term;
                    term = t_129.instance.invoke(context, c_129, this);
                    if(term == null)
                      break Fail72;
                    term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{a_129, termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term})});
                    term = this.invoke(context, term);
                    if(term == null)
                      break Fail72;
                    term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{term});
                    term = this.invoke(context, term);
                    if(term == null)
                      break Fail72;
                    if(true)
                      break Success54;
                  }
                  term = term6;
                }
                if(cons23 == Beautify._consNeg_1)
                { 
                  IStrategoTerm o_129 = null;
                  o_129 = term.getSubterm(0);
                  term = o_129;
                  IStrategoTerm term8 = term;
                  Success55:
                  { 
                    Fail73:
                    { 
                      if(term.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)term).getConstructor())
                        break Fail73;
                      IStrategoTerm arg15 = term.getSubterm(1);
                      if(arg15.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg15).getConstructor())
                        break Fail73;
                      { 
                        if(true)
                          break Fail70;
                        if(true)
                          break Success55;
                      }
                    }
                    term = term8;
                  }
                  term = o_129;
                  IStrategoTerm term9 = term;
                  Success56:
                  { 
                    Fail74:
                    { 
                      if(term.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)term).getConstructor())
                        break Fail74;
                      { 
                        if(true)
                          break Fail70;
                        if(true)
                          break Success56;
                      }
                    }
                    term = term9;
                  }
                  term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{o_129, Beautify.constInt0});
                  term = this.invoke(context, term);
                  if(term == null)
                    break Fail70;
                  term = termFactory.makeAppl(Beautify._consNeg_1, new IStrategoTerm[]{term});
                  term = this.invoke(context, term);
                  if(term == null)
                    break Fail70;
                }
                else
                { 
                  break Fail70;
                }
              }
            }
            if(true)
              break Success52;
          }
          term = term5;
        }
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class t_129 extends Strategy 
  { 
    public static final t_129 instance = new t_129();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term, Strategy w_129)
    { 
      Fail75:
      { 
        lifted1 lifted10 = new lifted1();
        lifted10.w_129 = w_129;
        term = SRTS_all.instance.invoke(context, term, lifted10);
        if(term == null)
          break Fail75;
        term = w_129.invoke(context, term);
        if(term == null)
          break Fail75;
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class lifted1 extends Strategy 
  { 
    Strategy w_129;

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      Fail76:
      { 
        term = t_129.instance.invoke(context, term, w_129);
        if(term == null)
          break Fail76;
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class o_143 extends Strategy 
  { 
    public static final o_143 instance = new o_143();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      ITermFactory termFactory = context.getFactory();
      Fail77:
      { 
        IStrategoTerm term4 = term;
        Success57:
        { 
          Fail78:
          { 
            IStrategoTerm f_143 = null;
            IStrategoTerm h_143 = null;
            IStrategoTerm i_143 = null;
            if(term.getTermType() != IStrategoTerm.APPL || Beautify._consNeg_1 != ((IStrategoAppl)term).getConstructor())
              break Fail78;
            IStrategoTerm arg9 = term.getSubterm(0);
            if(arg9.getTermType() != IStrategoTerm.APPL || Beautify._consMul_2 != ((IStrategoAppl)arg9).getConstructor())
              break Fail78;
            IStrategoTerm arg10 = arg9.getSubterm(0);
            if(arg10.getTermType() != IStrategoTerm.APPL || Beautify._consInt_1 != ((IStrategoAppl)arg10).getConstructor())
              break Fail78;
            h_143 = arg10.getSubterm(0);
            f_143 = arg9.getSubterm(1);
            term = termFactory.makeTuple(Beautify.const0, h_143);
            term = subt$S_0_0.instance.invoke(context, term);
            if(term == null)
              break Fail78;
            i_143 = term;
            term = n_143.instance.invoke(context, i_143, this);
            if(term == null)
              break Fail78;
            term = termFactory.makeAppl(Beautify._consMul_2, new IStrategoTerm[]{termFactory.makeAppl(Beautify._consInt_1, new IStrategoTerm[]{term}), f_143});
            if(true)
              break Success57;
          }
          term = term4;
        }
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class n_143 extends Strategy 
  { 
    public static final n_143 instance = new n_143();

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term, Strategy p_143)
    { 
      Fail79:
      { 
        lifted4 lifted40 = new lifted4();
        lifted40.p_143 = p_143;
        term = SRTS_all.instance.invoke(context, term, lifted40);
        if(term == null)
          break Fail79;
        term = p_143.invoke(context, term);
        if(term == null)
          break Fail79;
        if(true)
          return term;
      }
      return null;
    }
  }

  @SuppressWarnings("all") private static final class lifted4 extends Strategy 
  { 
    Strategy p_143;

    @Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
    { 
      Fail80:
      { 
        term = n_143.instance.invoke(context, term, p_143);
        if(term == null)
          break Fail80;
        if(true)
          return term;
      }
      return null;
    }
  }

  public static void registerInterop(org.spoofax.interpreter.core.IContext context, Context compiledContext)
  { 
    new InteropRegisterer().registerLazy(context, compiledContext, InteropRegisterer.class.getClassLoader());
  }

  @SuppressWarnings("unused") public static class InteropRegisterer extends org.strategoxt.lang.InteropRegisterer 
  { 
    @Override public void register(org.spoofax.interpreter.core.IContext context, Context compiledContext)
    { 
      register(context, compiledContext, context.getVarScope());
    }

    @Override public void registerLazy(org.spoofax.interpreter.core.IContext context, Context compiledContext, ClassLoader classLoader)
    { 
      registerLazy(context, compiledContext, classLoader, context.getVarScope());
    }

    private void register(org.spoofax.interpreter.core.IContext context, Context compiledContext, org.spoofax.interpreter.core.VarScope varScope)
    { 
      compiledContext.registerComponent("Beautify");
      Beautify.init(compiledContext);
      varScope.addSVar("LeftGroup_0_0", new InteropSDefT($Left$Group_0_0.instance, context));
      varScope.addSVar("EvalNeg_0_0", new InteropSDefT($Eval$Neg_0_0.instance, context));
      varScope.addSVar("EvalAdd0_0_0", new InteropSDefT($Eval$Add0_0_0.instance, context));
      varScope.addSVar("io_Beautify_0_0", new InteropSDefT(io_$Beautify_0_0.instance, context));
      varScope.addSVar("beautify_0_0", new InteropSDefT(beautify_0_0.instance, context));
      varScope.addSVar("NegMulConst_0_0", new InteropSDefT($Neg$Mul$Const_0_0.instance, context));
      varScope.addSVar("SortNeg_0_0", new InteropSDefT($Sort$Neg_0_0.instance, context));
      varScope.addSVar("Beautify_0_0", new InteropSDefT($Beautify_0_0.instance, context));
      varScope.addSVar("NegMul_0_0", new InteropSDefT($Neg$Mul_0_0.instance, context));
      varScope.addSVar("RemoveMul1_0_0", new InteropSDefT($Remove$Mul1_0_0.instance, context));
      varScope.addSVar("main_0_0", new InteropSDefT(main_0_0.instance, context));
    }

    private void registerLazy(org.spoofax.interpreter.core.IContext context, Context compiledContext, ClassLoader classLoader, org.spoofax.interpreter.core.VarScope varScope)
    { 
      compiledContext.registerComponent("Beautify");
      Beautify.init(compiledContext);
      varScope.addSVar("LeftGroup_0_0", new InteropSDefT(classLoader, "Beautify$$Left$Group_0_0", context));
      varScope.addSVar("EvalNeg_0_0", new InteropSDefT(classLoader, "Beautify$$Eval$Neg_0_0", context));
      varScope.addSVar("EvalAdd0_0_0", new InteropSDefT(classLoader, "Beautify$$Eval$Add0_0_0", context));
      varScope.addSVar("io_Beautify_0_0", new InteropSDefT(classLoader, "Beautify$io_$Beautify_0_0", context));
      varScope.addSVar("beautify_0_0", new InteropSDefT(classLoader, "Beautify$beautify_0_0", context));
      varScope.addSVar("NegMulConst_0_0", new InteropSDefT(classLoader, "Beautify$$Neg$Mul$Const_0_0", context));
      varScope.addSVar("SortNeg_0_0", new InteropSDefT(classLoader, "Beautify$$Sort$Neg_0_0", context));
      varScope.addSVar("Beautify_0_0", new InteropSDefT(classLoader, "Beautify$$Beautify_0_0", context));
      varScope.addSVar("NegMul_0_0", new InteropSDefT(classLoader, "Beautify$$Neg$Mul_0_0", context));
      varScope.addSVar("RemoveMul1_0_0", new InteropSDefT(classLoader, "Beautify$$Remove$Mul1_0_0", context));
      varScope.addSVar("main_0_0", new InteropSDefT(classLoader, "Beautify$main_0_0", context));
    }
  }
}